package com.gofaraway.service.enumfacade.strategy;

import com.gofaraway.common.enums.DisableEnum;
import com.gofaraway.service.enumfacade.constant.EnumTypeConstant;
import com.gofaraway.service.facade.response.EnumLabelVO;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author ChenPeng
 * @Date 2024/4/12 14:53
 */
@Component
public class DisableEnumStrategy implements EnumStrategy {


    @Override
    public List<EnumLabelVO> getEnumResultByCondition() {
        return Arrays.stream(DisableEnum.values())
                .map(v -> new EnumLabelVO(v.getValue(), v.getLabel())).collect(
                        Collectors.toList());
    }

    @Override
    public String enumType() {
        return EnumTypeConstant.DISABLE_ENUM;
    }
}
